package com.ktjy.plusthymeleaf.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyBatisPlusConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MyBatisPlusConfig interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new
                PaginationInnerceptor(DbYype.MYSQL));
        interceptor.addInnerInterceptor(new
                OptimisticLockerInnerInterceptor());
        interceptor.addInnerInterceptor(new
                BlockAttackInnerInterceptor());
        return interceptor;
    }
}
